-- GENERATED SPELL FOR [Spitelash Witch] --


function spell0_12205(pUnit, Event) --@Forked Lightning,n/a--
pUnit:FullCastSpellOnTarget(20299,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_12205', 2000, 1)
end

function spell1_12205(pUnit, Event) --@Frostbolt,n/a--
pUnit:FullCastSpellOnTarget(20297,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_12205', 7000, 1)
end

function spell2_12205(pUnit, Event) --@Lightning Shield,n/a--
pUnit:FullCastSpellOnTarget(12550,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_12205', 0, 1)
end

function Sorts_12205(pUnit, Event)
local choix_sorts_12205 = math.random(0, 2)
if choix_sorts_12205 == 0 then
pUnit:RegisterEvent('spell0_12205', 1, 1)
end
if choix_sorts_12205 == 1 then
pUnit:RegisterEvent('spell1_12205', 1, 1)
end
if choix_sorts_12205 == 2 then
pUnit:RegisterEvent('spell2_12205', 1, 1)
end
end

function mob12205_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_12205', math.random(1500, 3000), 1)
end

function mob12205_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob12205_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob12205_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(12205, 1, 'mob12205_Action')
RegisterUnitEvent(12205, 2, 'mob12205_Leave')
RegisterUnitEvent(12205, 3, 'mob12205_Kill')
RegisterUnitEvent(12205, 4, 'mob12205_Die')
